package com.common.retrofit.methods;

import com.common.retrofit.base.BaseMethods;
import com.common.retrofit.entity.bean.PayBean;
import com.common.retrofit.service.HaiNingService;

import rx.Observable;
import rx.Subscriber;

public class AliPayYajinMethods extends BaseMethods {

    private static AliPayYajinMethods m_ins = null;

    public static AliPayYajinMethods getInstance() {
        if (m_ins == null) {
            synchronized (AliPayYajinMethods.class) {
                if (m_ins == null) {
                    m_ins = new AliPayYajinMethods();
                }
            }
        }
        return m_ins;
    }

    @Override
    protected String getHttpUrl() {
        return "Order/";
    }

    private HaiNingService initService() {
        return getRetrofit().create(HaiNingService.class);
    }


    public void orderDeposit(Subscriber<PayBean> subscriber,
                      int uid ,
                      String hashid  ,  int  paytype) {
        Observable observable = initService().orderDeposit(System.currentTimeMillis()+"",
                "0e67d13c24de2978c4e3b24e4671fc9b",uid,hashid,paytype);
        toSubscribe(observable, subscriber);
    }
}
